package cn.itsource.mapper;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;

import java.util.Date;

@Data
@Document(collection = "mogo_employee")
public class Employee {
    @Id
    private String _id;
    private Long id;
    @Field(name = "user_name",targetType = FieldType.STRING)
    private String username;
    private Integer age;
    @Field(name = "create_date",targetType = FieldType.DATE_TIME)
    private Date createDate;

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
